const { ccclass, property } = cc._decorator;

@ccclass
export default class PlayeItem extends cc.Component {

    @property(cc.Node)
    ownerFlag: cc.Node = null;

    @property(cc.Label)
    lbName: cc.Label = null;

    @property(cc.Label)
    lbStatus: cc.Label = null;

    @property(cc.Label)
    lbLoading: cc.Label = null;

    @property(cc.ProgressBar)
    pbLoading: cc.ProgressBar = null;


    public setName(name: string) {
        this.lbName.string = name;
    }

    public isOwner(owener: boolean) {
        this.ownerFlag.active = owener;
    }

    public setReadyStatusByString(str: string) {
        this.lbStatus.string = str;
    }
}
